package com.eascs.ticket.configuration.controller;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eascs.site.page.PaginationInfo;
import com.eascs.site.page.SelectDataOption;
import com.eascs.site.view.ViewContext;
import com.eascs.site.view.button.Button;
import com.eascs.site.view.button.ButtonHelper;
import com.eascs.ticket.common.controller.BaseMasterViewController;
import com.eascs.ticket.configuration.service.UserAutoAssignService;

@Controller
public class UserAutoAssignViewController extends BaseMasterViewController {

	@Inject
	private UserAutoAssignService userAutoAssignService;

	@RequestMapping("/configuration/userAutoAssign/my")
	public String viewMyUserAutoAssigns() {
		PaginationInfo paginationInfo = new PaginationInfo(userAutoAssignService.getUserAutoAssignList(), new String[] { "开始日期", "结束日期", "转出人", "转入人", "创建时间", "修改时间", "创建人", "修改人", "状态" });
		paginationInfo.setMoreButtons(new Button[] { ButtonHelper.createAjaxButton("修改", "/configuration/userAutoAssign/getUserAutoAssignEditView?id=	") });
		paginationInfo.setSelectDataOptions(new SelectDataOption[] { null, null, null, null, null, null, null, null, new SelectDataOption("status") });
		ViewContext.put("paginationInfo", paginationInfo);
		ViewContext.put("title", "用户工单自动转移配置列表");
		ViewContext.put("addUrl", "/configuration/userAutoAssign/getUserAutoAssignEditView");
		return "view/paginationInfo";
	}
}
